﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserList.aspx.cs" Inherits="WebPubManager_UserList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户管理</title>
    <script type="text/javascript">
        //打开重置密码页面 addby zhongjian 20090927
        function OpenPassSet(id) {
            var url = "UserPassSet.aspx?id='" + id + "'";
            window.open(url, "view", "top=200,left=200,toolbar=no,menubar=no,scrollbars=yes,location=no,status=no,width=280,height=250;");
        }
        //用对话框模式打开重置密码页面,目的是在关闭弹出对话框之前不能做其它操作 addby zhongjian 20091018
        function OpenPassSet1(id) {
            returnVal = showModalDialog("UserPassSet.aspx?id=" + id + "", "", "dialogWidth=300px;dialogHeight=300px");
            if (returnVal == "True")//在子页面关闭时,当获取返回值为True,则刷新本页面
            {
                window.location.href = window.location.href; window.location.reload;
            }
        }
	
    </script>
    <link href="../css/page.css" rel="Stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div style="width: 98%; margin: 0px auto; text-align: center;">
        <table class="tab_top" width="98%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="18" align="left" valign="top">
                    <img src="../images/tab_top_left.gif" width="17" height="35" alt="" />
                </td>
                <td width="89%" align="center">
                    &nbsp;
                </td>
                <td>
                    <div>
                        <asp:Label ID="lblAdd" runat="server" Text=""></asp:Label></div>
                </td>
                <td align="right">
                    <img src="../images/tab_top_right.gif" width="5" height="35" alt="" />
                </td>
            </tr>
        </table>
        <table style="width: 98%; border-top-width: 0px" class="tab">
            <tr>
                <td>
                    用户ID<asp:TextBox ID="txtUserID" runat="server"></asp:TextBox>用户名称<asp:TextBox ID="txtUserName"
                        runat="server"></asp:TextBox>单位名称<asp:TextBox ID="txtUnitsName" runat="server"></asp:TextBox>
                    <asp:DropDownList runat="server" ID="ddlGly">
                        <asp:ListItem Value=""></asp:ListItem>
                        <asp:ListItem Value="1">管理员</asp:ListItem>
                        <asp:ListItem Value="0">非管理员</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Button ID="btnRefer" CssClass="input" runat="server" Text="查询" OnClick="btnRefer_Click" />
                    <asp:Button ID="btnReturn" CssClass="input" runat="server" Text="返回" OnClick="btnReturn_Click"
                        CausesValidation="False" />
                </td>
            </tr>
            <tr style="border-top-width: 0px">
                <td style="border-top-width: 0px">
                    <controlDefine:CustomGridView ID="gridviewCar" runat="server" AllowPaging="True"
                        Width="100%" SkinID="List" HideTextLength="30" AutoGenerateColumns="False" ShowCmpAndCancel="False"
                        AllowOnMouseOverEvent="False" ShowItemNumber="True" AutoGenerateDeleteConfirm="false"
                        ShowHideColModel="None" OnRowCreated="gridviewCar_RowCreated" OnOnLoadData="recvgrid_OnLoadData">
                        <PagerSettings Visible="False" />
                        <Columns>
                            <asp:BoundField HeaderText="用户ID" DataField="USERID" />
                            <asp:BoundField HeaderText="用户名称" DataField="USERNAME" />
                            <asp:BoundField HeaderText="密码" Visible="false" DataField="QUERY_PASS" />
                            <asp:BoundField HeaderText="单位名称" DataField="unitsname" />
                            <asp:TemplateField HeaderText="编辑">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hyedit" runat="server" Text="编辑"></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="重置密码">
                                <ItemTemplate>
                                    <!--重置密码修改为三种方式,在页面中实现 edit by zhongjian 20090927-->
                                    <a href='#' onclick="OpenPassSet1('<%# Eval("ID") %>')">重置密码</a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="删除">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hydel" runat="server" Text="删除"></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="设置">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbtnUnitsAdmin" runat="server" OnClick="lbtnUnitsAdmin_Click"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </controlDefine:CustomGridView>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
